home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / graphics / dimlib10 / unit1.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-11-13  |  1.2 KB  |  63 lines

  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls, DimLib;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Edit1: TEdit;
  12.     Label1: TLabel;
  13.     Label2: TLabel;
  14.     Edit2: TEdit;
  15.     Label3: TLabel;
  16.     Edit3: TEdit;
  17.     Label4: TLabel;
  18.     Edit4: TEdit;
  19.     Label5: TLabel;
  20.     Edit5: TEdit;
  21.     Label6: TLabel;
  22.     CheckBox1: TCheckBox;
  23.     Button1: TButton;
  24.     Button2: TButton;
  25.     procedure Button1Click(Sender: TObject);
  26.     procedure Button2Click(Sender: TObject);
  27.     procedure CheckBox1Click(Sender: TObject);
  28.   private
  29.     { Private declarations }
  30.   public
  31.     { Public declarations }
  32.   end;
  33.  
  34. var
  35.   Form1: TForm1;
  36.  
  37. implementation
  38.  
  39. uses Unit2;
  40.  
  41. {$R *.DFM}
  42.  
  43. procedure TForm1.Button1Click(Sender: TObject);
  44. begin
  45.   DimWindow(Handle);
  46.   Form2.ShowModal;
  47.   UnDimWindow(Handle);
  48. end;
  49.  
  50. procedure TForm1.Button2Click(Sender: TObject);
  51. begin
  52.   DimWindow(Handle);
  53.   MessageDlg('I knew you could do it!', mtInformation, [mbOk], 0);
  54.   UnDimWindow(Handle);
  55. end;
  56.  
  57. procedure TForm1.CheckBox1Click(Sender: TObject);
  58. begin
  59.   EnableDim(CheckBox1.Checked);
  60. end;
  61.  
  62. end.
  63.